#!/bin/bash
TMP=$1
p=$2
FLAGS=$3
FILES=$4
if [ "$HEAP_SIZE" = "" ]; then
  HEAP_SIZE=100m
fi
v3c-x86-darwin -opt=none -heap-size=$HEAP_SIZE -output=$TMP $FLAGS $FILES
if [ $? = 0 ]; then
	mv $TMP/${p} $TMP/${p}-x86-darwin-none
	echo $TMP/${p}-x86-darwin-none
else
	exit $?
fi
